<!doctype html>
<html>

	<head>
		<meta charset="UTF-8">
		<title>登录</title>
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<link href="css/mui.min.css" rel="stylesheet" />
		<link rel="stylesheet" type="text/css" href="css/common.css"/>
		<link href="fonts/iconfont.css" rel="stylesheet" />
		<link href="css/login.css" rel="stylesheet" />
	</head>

	<body>
		<header class="mui-bar mui-bar-nav">
			<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
			<h1 class="mui-title">登录</h1>
		</header>
		<div class="log-container">
			<div class="log-avatar-box"></div>
			<label class="log-row">
				<span class="label">账号</span>
				<input type="tel" name="account" id="account" placeholder="请填写手机号码" maxlength="11"/>
			</label>
			<label class="log-row">
				<span class="label">密码</span>
				<input type="password" name="password" id="password" value="" placeholder="请输入密码"/>
				<span id="clear-psw" class="mui-icon iconfont icon-cha2"></span>
				<span id="show-psw" class="mui-icon iconfont icon-yanjing"></span>
			</label>			
			<p class="forget-psw">
				<span class="tips hide"></span>
			</p>
			<button class="ok-btn" id="do-login" disabled="disabled">登录</button>
			<p>
				<a href="quick-reg.html" title="手机快速注册">手机号快速注册</a>
				<a href="forget-psw.html" class="mui-pull-right" title="忘记密码">忘记密码</a>
			</p>
		</div>
		
		<script src="js/mui.min.js"></script>
		<!--<script src="js/public.js"></script>-->
		<script type="text/javascript" src="js/jquery.min.js" ></script>
		<script type="text/javascript" src="js/html/common.js" ></script>
		<script type="text/javascript" src="js/html/login.js" ></script>
		<script type="text/javascript">
			mui.init()
			
			var btn = document.getElementById('do-login'),
				acc = document.getElementById('account'),
				psw = document.getElementById('password')
			
			document.getElementById('clear-psw').addEventListener('tap',function(){
				psw.value = ''
			})
			
			document.getElementById('show-psw').addEventListener('tap',function(){
				if(psw.type == 'password'){
					psw.type = 'text'
				}
				else{
					psw.type = 'password'
				}
				this.classList.toggle('active')
			})
			
			//控制登录按钮状态
			mui('.log-container').on('input','label input',function(){
				if(acc.value=='' || psw.value==''){
					btn.setDisable(true)
				}
				else btn.setDisable(false)
			})
			
			$('input').focus(function(){
				mui.scrollTo(9999)
			})
			
		</script>
	</body>

</html>